package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * PagePortal entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "PAGE_PORTAL")
public class PagePortal implements java.io.Serializable, Cloneable {

    /**
     * 
     */
    private static final long serialVersionUID = 1712177498274418794L;

    // Fields    
    private Long id;
    private String portalPage;
    private String title;
    private Integer colLength;
    private String userAccount;
    private Integer col1;
    private Integer col2;
    private Integer col3;
    private Integer col4;
    private Integer seq;

    // Constructors

    /** default constructor */
    public PagePortal() {
    }

    /** minimal constructor */
    public PagePortal(String portalPage) {
        this.portalPage = portalPage;
    }

    /** full constructor */
    public PagePortal(String portalPage, String title, Integer colLength, Integer col1, Integer col2, Integer col3, Integer col4, Integer seq) {
        this.portalPage = portalPage;
        this.title = title;
        this.colLength = colLength;
        this.col1 = col1;
        this.col2 = col2;
        this.col3 = col3;
        this.col4 = col4;
        this.seq = seq;
    }

    // Property accessors

    @Column(name = "PORTAL_PAGE", unique = true, nullable = false, length = 32)
    public String getPortalPage() {
        return this.portalPage;
    }

    public void setPortalPage(String portalPage) {
        this.portalPage = portalPage;
    }

    @Column(name = "TITLE", length = 32)
    public String getTitle() {
        return this.title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    @Column(name = "COL_LENGTH", precision = 1, scale = 0)
    public Integer getColLength() {
        return this.colLength;
    }

    public void setColLength(Integer colLength) {
        this.colLength = colLength;
    }

    @Column(name = "COL1", precision = 3, scale = 0)
    public Integer getCol1() {
        return this.col1;
    }

    public void setCol1(Integer col1) {
        this.col1 = col1;
    }

    @Column(name = "COL2", precision = 3, scale = 0)
    public Integer getCol2() {
        return this.col2;
    }

    public void setCol2(Integer col2) {
        this.col2 = col2;
    }

    @Column(name = "COL3", precision = 3, scale = 0)
    public Integer getCol3() {
        return this.col3;
    }

    public void setCol3(Integer col3) {
        this.col3 = col3;
    }

    @Column(name = "COL4", precision = 3, scale = 0)
    public Integer getCol4() {
        return this.col4;
    }

    public void setCol4(Integer col4) {
        this.col4 = col4;
    }

    @Column(name = "SEQ", precision = 3, scale = 0)
    public Integer getSeq() {
        return this.seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    @Override
    public String toString() {
        return "PagePortal [portalPage=" + portalPage + ", title=" + title + ", colLength=" + colLength + ", col1=" + col1 + ", col2=" + col2 + ", col3=" + col3 + ", col4=" + col4 + ", seq=" + seq + "]";
    }

    @Column(name = "user_account", length = 128)
    public String getUserAccount() {
        return userAccount;
    }

    public void setUserAccount(String userAccount) {
        this.userAccount = userAccount;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "page_portal_seq")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Override
    public PagePortal clone() throws CloneNotSupportedException {
        PagePortal testClone = null;
        try {
            testClone = (PagePortal) super.clone();
            testClone.setId(null);
            testClone.setUserAccount(null);
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return testClone;

    }

}